package com.gxuwz.zhangjiahui.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxuwz.zhangjiahui.entity.Budget;
import com.gxuwz.zhangjiahui.entity.Leader;
import com.gxuwz.zhangjiahui.mapper.BudgetMapper;
import com.gxuwz.zhangjiahui.mapper.LeaderMapper;
import com.gxuwz.zhangjiahui.service.IBudgetService;
import com.gxuwz.zhangjiahui.service.ILeaderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangjiahui
 * @since 2021-06-20
 */
@Service
public class BudgetServiceImpl extends ServiceImpl<BudgetMapper, Budget> implements IBudgetService {

    @Autowired
    private BudgetMapper budgetMapper;

    @Override
    public Budget findBudgetById(Budget budget) {
        return budgetMapper.findBudgetById(budget);
    }

    @Override
    public List<Budget> findBudgetByYear(Budget budget) {
        return budgetMapper.findBudgetByYear(budget);
    }

    @Override
    public List<Budget> findBudgetAll() {
        return budgetMapper.findBudgetAll();
    }

    @Override
    public IPage<Budget> selectBudgetPage(Page<Budget> page, Wrapper<Budget> wrapper) {
        return budgetMapper.selectBudgetPage(page, wrapper);
    }

    @Override
    public void addBudget(Budget budget) {
        budgetMapper.addBudget(budget);
    }

    @Override
    public void updateBudgetById(Budget budget) {
        budgetMapper.updateBudgetById(budget);
    }

    @Override
    public void deleteBudgetById(Budget budget) {
        budgetMapper.deleteBudgetById(budget);
    }
}
